package com.shebao.utils;

import com.alibaba.fastjson.JSONObject;
import com.shebao.bean.ResultBean;

public class ResultUtil {
	public static String fail(String msg){
		ResultBean r=new ResultBean();
		r.setCode(1);
		r.setMsg(msg);
		return JSONObject.toJSONString(r);
	}
	
	public static String success(Object obj){
		ResultBean r=new ResultBean();
		r.setData(obj);
		return JSONObject.toJSONString(r);
	}
}
